//
//  CTMediator+Web.m
//  TaoTuo
//
//  Created by admin on 2019/9/4.
//  Copyright © 2019 admin. All rights reserved.
//

#import "CTMediator+Web.h"

@implementation CTMediator (Web)

- (UIViewController *)web_viewControllerWithUrlString:(nullable NSString *)urlString htmlString:(nullable NSString *)htmlString
{
    if (urlString.length > 0) {
        urlString = [urlString stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
    }
    NSDictionary *dic = @{
        @"urlString" : urlString,
        @"htmlString" : htmlString
    };
    
    return [self performTarget:WebRoute action:route_action_name params:dic shouldCacheTarget:YES];
}

@end
